<template>
	<view>
		<image mode="widthFix" :src="src" class="bgImg"></image>
		<view class='courseBox'>
			<view class="courseTitle">全部课程</view>
			<view class='courseList' v-for="(course, index) in courseList" :key="index">
				<view class='leftCont'>
					<image :src='course.src'></image>
				</view>
				<view class='rightCont'>
					<view>
						<view class='fs_30'>{{course.title}}</view>
						<view class='orderInfo'>{{course.hour}}课时 | {{course.num}}学过</view>
					</view>
					<view class='justify_between'>
						<view class='price'>￥{{course.current}}<text>￥{{course.original}}</text></view>
					</view>
				</view>
			</view>
		</view>
		<image mode="widthFix" :src="bottomImg" class="bgImg"></image>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				src: '../../static/teacher_bg.png',
				courseList: [
					{
						src: '../../static/img_kecheng2x.png',
						title: '英语零基础直达大学四级',
						hour: 36,
						num: 1020,
						current: 399,
						original: 499
					},
					{
						src: '../../static/img_kecheng2x.png',
						title: '英语零基础直达大学四级',
						hour: 36,
						num: 1020,
						current: 399,
						original: 499
					}
				],
				bottomImg: '../../static/teacher_di.png'
			}
		},
		methods: {

		}
	}
</script>

<style>
	.bgImg {
		width: 100%;
		display: block;
	}

	.courseBox {
		padding: 20rpx 40rpx;
		background-color: #0D47A1;
		margin-top: -2rpx;
	}

	.courseTitle {
		color: #fff;
		position: relative;
		margin-bottom: 20rpx;
		margin-left: 30rpx;
		padding-left: 30rpx;
		font-size: 34rpx;
	}

	.courseTitle::after {
		content: "";
		position: absolute;
		top: 6rpx;
		left: 0;
		background-color: #fff;
		width: 16rpx;
		height: 32rpx;
	}

	.courseList {
		display: flex;
		background: #3D6CB4;
		padding: 20rpx;
		margin-bottom: 20rpx;
		border-radius: 10rpx;
	}

	.leftCont image {
		width: 220rpx;
		height: 162rpx;
		display: block;
	}

	.cardImg {
		width: 294rpx;
		height: 194rpx;
	}

	.rightCont {
		width: 100%;
		margin-left: 30rpx;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		color: #fff;
	}

	.notFull {
		color: #ec691a;
	}

	.full {
		color: #aaa;
	}

	.orderInfo {
		font-size: 24rpx;
		line-height: 2;
		color: #ABBFDE;
	}

	.price {
		font-size: 34rpx;
		color: #f14927;
	}

	.price text {
		font-size: 24rpx;
		color: #ACBBDA;
		text-decoration: line-through;
	}
</style>
